import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:social_module/view/social_add.dart';
import 'package:social_module/view/social_main.dart';
import 'package:social_module/viewmodel/list_provider.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MultiProvider(
      providers: [ChangeNotifierProvider(create: (context) => ListProvider())],
      child: MaterialApp(
        debugShowCheckedModeBanner: false,
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
        routes: {
          "/": (context) => SocialMainPage(),
          "/add": (context) => SocialAddPage(),
        },
      ),
    );
  }
}
